<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class Service extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
        //  `user_id` int(11) NOT NULL COMMENT '用户ID',
        //  `category_id` int(11) NOT NULL COMMENT '分类ID',
        //  `name` varchar(255) NOT NULL COMMENT '服务名称',
        //  `price` decimal(11,2) NOT NULL COMMENT '服务金额',
        //  `time` int(11) NOT NULL COMMENT '服务时间（单位分）',
        //  `remarks` text NOT NULL COMMENT '服务备注',
        //  `status` tinyint(1) NOT NULL COMMENT '状态，禁用：-1，正常：1',
        Schema::dropIfExists('service');
        Schema::create('service', function (Blueprint $table){
            $table->comment = "安保用户标";
            $table->increments('id')->comment("ID");
            $table->integer("user_id")->comment("用户ID");
            $table->integer("category_id")->comment("分类ID");
            $table->string("name")->comment("服务名称");
            $table->decimal("price")->comment("服务金额");
            $table->integer("time")->comment("服务时间/分");
            $table->text("remarks")->comment("服务备注");
            $table->tinyInteger("status")->comment("状态");
            $table->integer('create_time')->comment("创建时间");
            $table->integer('update_time')->comment("更新时间");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
